-- GENERATED SPELL FOR [Kobold Geomancer] --


function spell0_476(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20793,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_476', 3000, 1)
end

function spell1_476(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_476', 0, 1)
end

function Sorts_476(pUnit, Event)
local choix_sorts_476 = math.random(0, 1)
if choix_sorts_476 == 0 then
pUnit:RegisterEvent('spell0_476', 1, 1)
end
if choix_sorts_476 == 1 then
pUnit:RegisterEvent('spell1_476', 1, 1)
end
end

function mob476_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_476', math.random(1500, 3000), 1)
end

function mob476_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob476_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob476_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(476, 1, 'mob476_Action')
RegisterUnitEvent(476, 2, 'mob476_Leave')
RegisterUnitEvent(476, 3, 'mob476_Kill')
RegisterUnitEvent(476, 4, 'mob476_Die')
